package com.hzit.client.factory;

import com.hzit.client.ClassesClient;
import com.hzit.util.R;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@Component
public class ClassesClientFallBackFactory implements FallbackFactory<ClassesClient> {
	@Override
	public ClassesClient create(Throwable cause) {
		return new ClassesClient() {
			@Override
			public R list() {
				return R.error("【fallbackFactory属性】调用不到班级对象的方法！");
			}
		};
	}
}
